package io.xccit.train.common.enums;

/**
  *@author CH_ywx
  *@create 2024/11/6
  *<p>业务自定义异常枚举</p>
  *@version 1.0
*/
public enum BusinessCode {
    MEMBER_MOBILE_EXIST("手机号已注册"),
    MEMBER_IS_NOT_EXIST("用户不存在"),
    VALIDATE_CODE_ERROR("验证码错误"),
    VALIDATE_CODE_OFTEN("验证码获取频繁,请稍后再试"),
    MEMBER_PASSWORD_ERROR("密码错误"),
    MEMBER_LOGIN_ERROR("登录失败"),
    MEMBER_TOKEN_EXPIRED("身份过期,请重新登录"),
    INVALID_TOKEN("无效的身份令牌"),
    MEMBER_LOGOUT_ERROR("退出失败");

    private String desc;

    BusinessCode(String desc) {
        this.desc = desc;
    }

    public String getDesc() {
        return desc;
    }

    @Override
    public String toString() {
        return "BusinessCode{" +
                "desc='" + desc + '\'' +
                '}';
    }
}
